package com.zzgele.qmzb.api.dao;

import com.zzgele.qmzb.api.core.Mapper;
import com.zzgele.qmzb.api.model.UserV;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.HashMap;

/**
 * Created by cyoung on 2017/10/25.
 */
@Repository
public interface UserVMapper extends Mapper<UserV> {

    @Select("select u.id,u.uid,u.v_type_id from user_v u where u.uid =#{uid}")
    HashMap getMyInfo(Long uid);

    @Select("select u.id,u.uid,u.v_type_id,uvc.v_des,uvc.v_img_url from user_v u left join user_v_conf uvc on uvc.id = u.v_type_id where u.uid =#{uid}")
    HashMap getMyVInfo(Long uid);
}
